#include "avz.h"

using namespace AvZ;

void Script()
{
    SetZombies({
        ZOMBIE,
        POLE_VAULTING_ZOMBIE,
        FOOTBALL_ZOMBIE,
        DANCING_ZOMBIE,
        ZOMBONI,
        JACK_IN_THE_BOX_ZOMBIE,
        DIGGER_ZOMBIE,
        POGO_ZOMBIE,
        BUNGEE_ZOMBIE,
        LADDER_ZOMBIE,
        CATAPULT_ZOMBIE,
        GARGANTUAR,
        GIGA_GARGANTUAR,
        DOLPHIN_RIDER_ZOMBIE,
        SNORKEL_ZOMBIE,
    });

    SelectCards({
        CHERRY_BOMB,
        ICE_SHROOM,
        COFFEE_BEAN,
    });

    SetTime(-599, 1);
    pao_operator.resetPaoList({
        {2, 1},
        {3, 1},
        {4, 1},
        {5, 1},
        {3, 3},
        {4, 3},
        {1, 5},
        {2, 5},
        {3, 5},
        {4, 5},
        {5, 5},
        {6, 5},
        {1, 7},
        {2, 7},
        {3, 7},
        {4, 7},
        {5, 7},
        {6, 7},
    });

    for (auto wave : {1, 3, 5, 7, 12, 14, 16, 18}) {
        SetTime(-95, wave);
        pao_operator.pao({{2, 9}, {5, 9}});
    }

    for (auto wave : {2, 4, 6, 8, 11, 13, 15, 17}) {
        SetTime(189 - 373, wave);
        pao_operator.pao({{2, 9}, {5, 9}});
        SetTime(359 - 373);
        pao_operator.pao({{2, 9}, {5, 9}});
    }

    for (auto wave : {9}) {
        SetTime(-95, wave);
        pao_operator.pao({{2, 9}, {5, 9}});
        SetTime(189 - 373 + 601);
        pao_operator.pao({{2, 9}, {5, 9}});
        SetTime(359 - 373 + 601);
        pao_operator.pao({{2, 9}, {5, 9}});
        SetTime(-95 + 601 + 601);
        pao_operator.pao({{2, 9}, {5, 9}});
    }

    for (auto wave : {10}) {
        SetTime(-55, wave);
        pao_operator.pao({{2, 9}, {5, 9}});
        SetTime(301);
        Card(CHERRY_BOMB, 2, 9);
        SetTime(394 - 100 - 198);
        Card({{ICE_SHROOM, 1, 1}, {COFFEE_BEAN, 1, 1}});
    }

    for (auto wave : {19}) {
        SetTime(189 - 373, wave);
        pao_operator.pao({{2, 9}, {5, 9}});
        SetTime(359 - 373);
        pao_operator.pao({{2, 9}, {5, 9}});
        SetTime(-95 + 601);
        pao_operator.pao({{2, 9}, {5, 9}});
        SetTime(189 - 373 + 601 + 601, wave);
        pao_operator.pao({{2, 9}, {5, 9}});
        SetTime(359 - 373 + 601 + 601);
        pao_operator.pao({{2, 9}, {5, 9}});
    }

    for (auto wave : {20}) {
        SetTime(-150, wave);
        pao_operator.pao(4, 7.5875);
        SetTime(-55);
        pao_operator.pao({{2, 9}, {5, 9}});
        SetTime(410 - 373);
        pao_operator.recoverPao({{2, 9}, {5, 9}, {2, 9}, {5, 9}});
        SetTime(410 - 100 - 198);
        Card({{ICE_SHROOM, 1, 1}, {COFFEE_BEAN, 1, 1}});
        SetTime(1770 - 373);
        pao_operator.pao({{2, 9}, {5, 9}});
    }
}